#ifndef __PARSER_H__
#define __PARSER_H_

#include "queue.h"

class Parser{
public:
  Parser(char *infile, int this_src);
  ~Parser();
  void Update();
  void SetL1(Queue* L1Q) {memQ = L1Q;}
  bool QEmpty() {return feof(ifile);}
  unsigned long total;
private:
  FILE* ifile;
  Queue* memQ;
  unsigned long clk_next_req;
  QueueElement nxt_cmd;
  void ReadNextCmd();  
};

#endif
